﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;

namespace Timeline.Beans {
    public class ReleaseApi {
        [JsonProperty(PropertyName = "status")]
        public int Status { set; get; }

        [JsonProperty(PropertyName = "msg")]
        public string Msg { set; get; }

        [JsonProperty(PropertyName = "data")]
        public ReleaseApiData Data { set; get; }
    }

    public class ReleaseApiData {
        // 版本
        [JsonProperty(PropertyName = "ver")]
        public string Version { get; set; }

        // 链接
        [JsonProperty(PropertyName = "url")]
        public string Url { get; set; }

        // 运营信息
        [JsonProperty(PropertyName = "life")]
        public LifeApiData Life { get; set; }

        // 公告板
        [JsonProperty(PropertyName = "bbs")]
        public List<BbsApiData> Bbs { get; set; }
    }

    public class LifeApiData {
        // 历史赞助笔数
        [JsonProperty(PropertyName = "donatecount")]
        public int DonateCount { set; get; }

        // 历史赞助人数
        [JsonProperty(PropertyName = "sponsorcount")]
        public int SponsorCount { set; get; }

        // 已运营天数
        [JsonProperty(PropertyName = "past")]
        public int Past { set; get; }

        // 预计可运营天数（按今日成本）
        [JsonProperty(PropertyName = "remain")]
        public int Remain { set; get; }
    }

    public class BbsApiData {
        // ID
        [JsonProperty(PropertyName = "id")]
        public int Id { set; get; }

        // 开始日期：yyyy-MM-dd
        [JsonProperty(PropertyName = "start")]
        public string Start { set; get; }

        // 内容
        [JsonProperty(PropertyName = "comment")]
        public string Comment { set; get; }
    }
}
